﻿// -----------------------------------------------------------------------
// <copyright file="ImageViewModel.cs" company="EPAM Systems">
////Copyright (c) EPAM Systems, 2012. All rights reserved.
// </copyright>
// -----------------------------------------------------------------------

namespace MBOP.Website.ViewModels.Common
{
	#region Usings

	using MBOP.Website.CustomAttributes;

	#endregion

	/// <summary>
	/// Represents view model for image.
	/// </summary>
	public class ImageViewModel
	{
		/// <summary>
		/// Gets or sets the image id.
		/// </summary>
		public string ID { get; set; }

		/// <summary>
		/// Gets or sets the image name.
		/// </summary>
		public string Name { get; set; }
		
		/// <summary>
		/// Gets or sets the image uri.
		/// </summary>
		public string Uri { get; set; }

		/// <summary>
		/// Gets or sets the image content.
		/// </summary>
		public byte[] Content { get; set; }
		
		/// <summary>
		/// Gets or sets the image content type.
		/// </summary>
		[IsValidImageFormat(ErrorMessage = "Image format error, allowed formats: {0}")]
		public string ContentType { get; set; }
	}
}